﻿@using VirtualPress.Infrastructure.Entities.Enum;
@using VirtualPress.Infrastructure.Entities.Entity;
@{
    ViewBag.Title = "期刊控制台 —— 期刊链接";
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
@section head{
    <link rel="stylesheet" href="/content/css/uniform.css" />
}
<div id="content-header">
    <h1>
        初审员</h1>
</div>
<div id="breadcrumb">
    <a href="/WorkSpace/console/index" class="tip-bottom"><i class="icon-home"></i>起始页</a> <a href="/WorkSpace/Console/Counsellor">
        人员管理</a> <a href="javascript:" class="current">初审员</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <ul class="nav nav-tabs" style="float:left;">
                        <li><a href="/workspace/console/Counsellor">编委会成员</a> </li>
                        <li class="active"><a href="javascript:;">初审成员</a></li>
                        <li><a href="/workspace/console/InvitePending">待确认</a></li>
                    </ul>
                    <div class="buttons">
                        <a href="/WorkSpace/Console/InviteReviser@{Html.Raw(String.IsNullOrEmpty(Request.QueryString["journal"]) ? "" : "?journal=" + Request.QueryString["journal"]);}" class="btn btn-success btn-mini">
                            <i class="icon-plus icon-white"></i>新增初审员</a>
                    </div>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered">
                        <thead>
                            <tr style="cursor: pointer;">
                                <th style="width: 20%">
                                    姓名
                                </th>
                                <th style="width: 10%">
                                    性别
                                </th>
                                <th style="width: 20%">
                                    现居
                                </th>
                                <th style="width: 25%">
                                    联系电话
                                </th>
                                <th style="width: 10%">
                                    角色
                                </th>
                                <th style="width: 15%">
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @{ItemListBox<Organization> data = ViewBag.Editorial;
                              List<Organization> list = data.Data;}
                            @foreach (var item in list)
                            { 
                                <tr>
                                    <td style="text-align: center">
                                        @item.user.NickName 
                                    </td>
                                    <td style="text-align: center">
                                        @item.user.Gender.Mapping()
                                    </td>
                                    <td style="text-align: center">
                                        @item.user.Area.Mapping() - @item.user.Location.Mapping()
                                    </td>
                                    <td style="text-align: center">
                                        @item.user.Phone
                                    </td>
                                    <td style="text-align: center">
                                        初审员
                                    </td>
                                    <td style="text-align: center">
                                        <a href="javascript:;" onclick="CancelReviser('@item.user.UserName')" class="btn btn-danger btn-mini">
                                            删除</a>
                                    </td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>
                @Html.Raw(data.PageItemSegment)
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript" src="/scripts/jquery.uniform.js"></script>
    <script type="text/javascript" src="/scripts/select2.min.js"></script>
    <script type="text/javascript" src="/scripts/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="/scripts/unicorn.tables.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#likorganization ul li:eq(0)').addClass('active');
            $('#likorganization').addClass('open');
        });
        function CancelReviser(username) {
            if (confirm('您确认要移除这位校对员吗？')) {
                window.location.href = '/workspace/console/CacnelReviser?journal=@Request.QueryString["journal"]&u=' + username;
            }
        }
    </script>
}
